//
//  ForgetGesturePwd.m
//  DaoZiJinFu
//
//  Created by woker on 16/8/17.
//  Copyright © 2016年 iwoker. All rights reserved.
//

#import "ForgetGesturePwd.h"

@implementation ForgetGesturePwd

+ (instancetype)showView:(UIView *)view {
    ForgetGesturePwd *forgetGesture = [[[NSBundle mainBundle] loadNibNamed:@"ForgetGesturePwd" owner:nil options:nil] lastObject];
    [view addSubview:forgetGesture];
    
    [forgetGesture mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(view.mas_top);
        make.leading.equalTo(view.mas_leading);
        make.bottom.equalTo(view.mas_bottom);
        make.trailing.equalTo(view.mas_trailing);
    }];
    
    [forgetGesture readjustView];
    
    return forgetGesture;
}

- (IBAction)sureClick:(id)sender {
    [self removeFromSuperview];
    [[NSNotificationCenter defaultCenter]postNotificationName:@"forgetGestureToLogin" object:self];
}

- (IBAction)cancelClick:(id)sender {
    [self removeFromSuperview];
}

- (void)readjustView {
    _alert.layer.masksToBounds = YES;
    _alert.layer.cornerRadius = 10;
}

- (void)awakeFromNib {
    [super awakeFromNib];
}

@end
